package com.kunbo.cn.entity.system;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

@Entity
@Table(name="sys_business_code")
//@GenericGenerator(name = "jpa-uuid", strategy = "uuid")生成uuid
@EntityListeners(AuditingEntityListener.class)
public class BusinessCode implements Serializable{
	public BusinessCode() {
		//super();
		// TODO Auto-generated constructor stub
	}
	public BusinessCode(String type, Integer number, String date) {
		super();
		this.type = type;
		this.number = number;
		this.date = date;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public Integer getNumber() {
		return number;
	}
	public void setNumber(Integer number) {
		this.number = number;
	}
	public String getDate() {
		return date;
	}
	public void setDate(String date) {
		this.date = date;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public Date getLastModifiedTime() {
		return lastModifiedTime;
	}
	public void setLastModifiedTime(Date lastModifiedTime) {
		this.lastModifiedTime = lastModifiedTime;
	}
	private static final long serialVersionUID = 1L;
//	@Id
//	@GeneratedValue(generator = "jpa-uuid")
//    @Column(length = 32)
//	private String id;//主键uuid
	@Id @Column(name="id")
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;//id
	private String type;//编码类型
	private Integer number;//序号
	private String date;//日期
	
	@CreatedDate
    private Date createTime;//创建时间
    @LastModifiedDate
    private Date lastModifiedTime;//修改时间

}
